//用户模块
export default {
    namespaced: true,
    state: () => {
        return {
            // 用户信息
            profile: {
                account:'',
                id: '',
                avatar: '',
                nickname: '',
                mobile: '',
                token: ''
            },
            //记录跳转页
            reDirectiveUrl:''
        }
    },
    getters: {

    },
    mutations: {
        // 修改用户信息，payload就是用户信息对象
        setUser(state, payload) {
            state.profile = payload
        },
        setRedirectiveUrl(state,value) {
            state.reDirectiveUrl = value
        }
    },
    actions: {
        setRedirectiveUrl(ctx,value) {
            ctx.commit('setRedirectiveUrl',value)
        }
    }
}